﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace TinyEngineEditor
{
    /// <summary>
    /// Interaction logic for SplashScreen.xaml
    /// </summary>
    public partial class SplashScreen : Window
    {
        public SplashScreen()
        {
            InitializeComponent();
        }

        static SplashScreen screen;
        public static void Start(Window parent)
        {
            if (screen == null)
            {
                screen = new SplashScreen();
                screen.Topmost = true;
                screen.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                screen.ShowDialog();
            }
        }

        public static void End()
        {
            if (screen == null)
                return;

            screen.Close();
            screen = null;
        }
    }
}
